package com.noble.glamour.module.local.chat.msgtype.type;

import com.noble.glamour.module.local.chat.msgtype.bean.BaseMessage;

import org.json.JSONObject;

/**
 * 视频优化版： FaceU道具消息，投诉警告消息
 * Created by Su on 2017/7/20.
 */
public class VideoOptiMessage extends BaseMessage {
    private long fid;
    private long tid;

    private int faceu_id;   // 道具id
    private long vc_id;     // 聊天渠道id

    /**
     * 解析道具消息
     */
    public VideoOptiMessage parseFaceU(String jsonStr) {
        super.parseJson(jsonStr);
        JSONObject object = getJsonObject(jsonStr);
        this.setFid(object.optLong("fid"));
        this.setTid(object.optLong("tid"));
        this.setType(object.optInt("mtp")); //消息类型
        this.setMsgDesc(object.optString("mct")); //消息内容
        this.setTime(object.optLong("mt")); //消息时间 int64

        this.setFaceu_id(object.optInt("faceu_id"));
        this.setVc_id(object.optLong("vc_id"));
        return this;
    }

    public long getTid() {
        return tid;
    }

    public void setTid(long tid) {
        this.tid = tid;
    }

    public long getFid() {
        return fid;
    }

    public void setFid(long fid) {
        this.fid = fid;
    }

    public int getFaceu_id() {
        return faceu_id;
    }

    public void setFaceu_id(int faceu_id) {
        this.faceu_id = faceu_id;
    }

    public long getVc_id() {
        return vc_id;
    }

    public void setVc_id(long vc_id) {
        this.vc_id = vc_id;
    }
}
